Carbon


SetControlReference

Header: Controls.h Carbon status: Supported

Changes a control’s current reference value.

void SetControlReference (
    ControlRef theControl, 
    SInt32 data
);
theControl

A handle to the control whose reference value you wish to change.

data

The new reference value for the control.

DISCUSSION

The SetControlReference function sets the control’s reference value to the value you specify in the data parameter.

When you create a control, you specify an initial reference value, either in the control resource or in the refCon parameter of the function NewControl. The reference value is stored in the contrlRfCon field of the control structure; you can use the function GetControlReference to obtain the current value. You can use this value for any purpose.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)